using System;
using System.Collections.Generic;

namespace LS.Digitize
{
    public interface ISerializer
    {
        int Priority { get; }
        bool IsPrimitive { get; }
        bool IsValueType { get; }
        bool IsCollection { get; }
        bool IsDictionary { get; }
        bool IsTuple { get; }
        bool IsEnum { get; }
        bool IsUnityObject { get; }
        bool IsReflectedType { get; }
        bool IsUnsupported { get; }
        Type DataType { get; }
        void Write(IWriter writer, object obj);
        object Read(IReader reader);
    }

    public interface ISerializer<T> : ISerializer
    {
        void WriteData(IWriter writer, T obj);
        T ReadData(IReader reader);
    }
}